'use strict';


(function curDate() {
    const myDate = new Date();
    const year = myDate.getFullYear();
    const month = myDate.getMonth() + 1;
    const date = myDate.getDate();
    const week = myDate.getDay();
    const strWeek = ['日', '一', '二', '三', '四', '五', '六'];

    const strDate = `${year}年${month}月${date}日 星期${strWeek[week]}`;

    // 获取DOM节点，设置日期
    const dateSpan = document.querySelector('#dynamicDate');
    dateSpan.textContent = strDate;
})();
